import request from '@/request';
import type {editFormData , addFormData} from '../@types/index';

/**获取友情连接*/
export const getLinks = (params: { page: number, pageSize: number , title ?: string}) => {
    return request({
        url: '/api/v2/admin/getLinks',
        method: 'get',
        params
    })
} 

/**添加友情连接*/
export const addLinks = (data: addFormData ) => request({
    url: '/api/v2/admin/addLinks',
    method: 'post',
    data
}) 

/**删除友情连接*/
export const delLinks = (data: { ID: string }) => request({
    url: '/api/v2/admin/delLinks',
    method: 'post',
    data
})

/**更新友情连接*/
export const updataLinks = (data: editFormData) => request({
    url: '/api/v2/admin/updataLinks',
    method: 'post',
    data
})